<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    #box {
      display: flex;
      justify-content: center;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
    }

    #box>.ball {
      width: 20px;
      height: 20px;
      background-color: #8385aa;
      margin: 5px;
      border-radius: 50%;
      animation: box-ball .6s infinite alternate;
    }

    #box>.ball:nth-child(2) {
      animation-delay: .2s;
    }

    #box>.ball:nth-child(3) {
      animation-delay: .4s;
    }

    @keyframes box-ball {
      100% {
        opacity: .1;
        transform: translate(0, -10px);
      }
    }
  </style>
</head>

<body>
  <div id="box">
    <div class="ball"></div>
    <div class="ball"></div>
    <div class="ball"></div>
  </div>
</body>

</html>